<?php

class Nuo_Validator_Required extends Nuo_Validator_Abstract
{
	/**
	 * @var array
	 */
	public $_config = array('msg' => 'This field is required');

	/**
	 * @param $mixed $value value to test
	 * @param array $params
	 * @return bool
	 */
	public function isValid($value, $params = null)
	{
		return !($value == null || $value == array() || $value == '' ||  $value && is_scalar($value) && trim($value) == '');
	}

}
